Optimal. Leaf size=49 \[ -\frac {(A+C) \tan (c+d x)}{a d (\sec (c+d x)+1)}+\frac {A x}{a}+\frac {C \tanh ^{-1}(\sin (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {4051, 3770, 3919, 3794} \[ -\frac {(A+C) \tan (c+d x)}{a d (\sec (c+d x)+1)}+\frac {A x}{a}+\frac {C \tanh ^{-1}(\sin (c+d x))}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3794
Rule 3919
Rule 4051
Rubi steps
\begin {align*} \int \frac {A+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int \frac {a A-a C \sec (c+d x)}{a+a \sec (c+d x)} \, dx}{a}+\frac {C \int \sec (c+d x) \, dx}{a}\\ &=\frac {A x}{a}+\frac {C \tanh ^{-1}(\sin (c+d x))}{a d}+(-A-C) \int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx\\ &=\frac {A x}{a}+\frac {C \tanh ^{-1}(\sin (c+d x))}{a d}-\frac {(A+C) \tan (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.47, size = 143, normalized size = 2.92 \[ -\frac {4 \cos \left (\frac {1}{2} (c+d x)\right ) \left (A \cos ^2(c+d x)+C\right ) \left ((A+C) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )-\cos \left (\frac {1}{2} (c+d x)\right ) \left (A d x-C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+C \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{a d (\cos (c+d x)+1) (A \cos (2 (c+d x))+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 88, normalized size = 1.80 \[ \frac {2 \, A d x \cos \left (d x + c\right ) + 2 \, A d x + {\left (C \cos \left (d x + c\right ) + C\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (C \cos \left (d x + c\right ) + C\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (A + C\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.71, size = 80, normalized size = 1.63 \[ \frac {\frac {{\left (d x + c\right )} A}{a} + \frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.76, size = 98, normalized size = 2.00 \[ \frac {2 A \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) C}{a d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) C}{a d}-\frac {C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.52, size = 125, normalized size = 2.55 \[ \frac {A {\left (\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + C {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.74, size = 101, normalized size = 2.06 \[ \frac {2\,A\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+2\,C\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{a\,d}-\frac {A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________